home *** CD-ROM | disk | FTP | other *** search
- #include <wfc.h>
- #pragma hdrstop
-
- /*
- ** Author: Samuel R. Blackburn
- ** CI$: 76300,326
- ** Internet: sammy@sed.csc.com
- **
- ** You can use it any way you like.
- */
-
- #if defined( _DEBUG )
- #undef THIS_FILE
- static char BASED_CODE THIS_FILE[] = __FILE__;
- #endif
-
- CWaitCursor::CWaitCursor( int cursor_number )
- {
- if ( cursor_number == 0 )
- {
- AfxGetApp()->BeginWaitCursor();
- m_PreviousCursorHandle = NULL;
- }
- else
- {
- HCURSOR cursor_handle = AfxGetApp()->LoadCursor( cursor_number );
- m_PreviousCursorHandle = ::SetCursor( cursor_handle );
- }
- }
-
- CWaitCursor::~CWaitCursor()
- {
- if ( m_PreviousCursorHandle == NULL )
- {
- AfxGetApp()->EndWaitCursor();
- }
- else
- {
- ::SetCursor( m_PreviousCursorHandle );
- }
- }
-